﻿<%@ Page Title="Imagens-Cadastro" Language="C#" MasterPageFile="~/Default.Master"
     CodeBehind="Imagens.aspx.cs" Buffer="true" Inherits="SisEagle.View.Web.Produto.Imagens" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/UserControl/UcBotoesCadastro.ascx" TagName="ucBotoesCadastro"
    TagPrefix="uc" %>
<%@ Register Src="~/UserControl/UcProdutos.ascx" TagName="ucProdutos" TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />
    <script src="../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="prototype.js"></script>
    <script type="text/javascript" src="scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="lightbox.js"></script>
    <script src="<%=ResolveUrl("~/Cadastro/scripts/cliente.js")%>" type="text/javascript">

    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#BotoesCadastro").removeClass("ucBotoes");
            $("#BotoesCadastro").addClass("ucBotoesFotos");


        });

        function uploadError(sender, args) {
            $("#lblStatus").innerText = args.get_fileName(),
	     "<span style='color:red;'>" + args.get_errorMessage() + "</span>";
        }

        function StartUpload(sender, args) {
            $("#lblStatus").innerText = 'Uploading Started.';
        }

        function UploadComplete(sender, args) {
            var filename = args.get_fileName();
            var contentType = args.get_contentType();
            var text = "Size of " + filename + " is " + args.get_length() + " bytes";
            if (contentType.length > 0) {
                text += " and content type is '" + contentType + "'.";
            }
            document.getElementById('lblStatus').innerText = text;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="conteudo_interno">
        <div class="titulos_modulosCadastro">
            Imagens-Cadastro
        </div>
        <table style="width: 100%;">
            <tr>
                <td style="width: 127px;">
                    Codigo.:
                </td>
                <td style="width: 47px;">
                    <asp:TextBox ID="txtCodigo" ClientIDMode="Static" runat="server" Width="88px" Enabled="false"
                        ValidationSettings-Display="Dynamic" CausesValidation="True" />
                </td>
                <td>
                    Arquivo:
                </td>
                <td>
                    <asp:AsyncFileUpload ID="AsyncFileUpload1" runat="server" OnClientUploadError="uploadError"
                        Width="400px" OnClientUploadComplete="UploadComplete" OnClientUploadStarted="StartUpload"
                        UploaderStyle="Modern" UploadingBackColor="#66CCFF" ThrobberID="Throbber" CompleteBackColor="Lime"
                        ErrorBackColor="Red" ToolTip="Selecione um Arquivo" />
                    <img src="" id="imgUpload" alt="" />
                </td>
                <td>
                    <asp:Label ID="Throbber" ClientIDMode="Static" runat="server" Style="display: none">
                     <img src="../imagens/gif/ajax-loader.gif" align="middle" alt="Carregando" />
                    </asp:Label>
                </td>
                <td>
                    <asp:Label ID="lblStatus" ClientIDMode="Static" runat="server" Style="font-family: Arial;
                        font-size: small;"></asp:Label>
                </td>
                
                <td>
                </td>
            </tr>
        </table>
        <div id="SliderProdutos">
            <asp:DataList ID="dlImages" runat="server" RepeatColumns="3" CellPadding="5">
                <ItemTemplate>
                    <a id="imageLink" href='<%# Eval("ImageName","~/SlideImages/{0}") %>' title='<%#Eval("Description") %>'
                        rel="lightbox[Brussels]" runat="server">
                        <asp:Image ID="Image1" ImageUrl='<%# Bind("ImageName", "~/SlideImages/{0}") %>' runat="server"
                            Width="112" Height="84" />
                    </a>
                </ItemTemplate>
                <ItemStyle BorderColor="Brown" BorderStyle="dotted" BorderWidth="3px" HorizontalAlign="Center"
                    VerticalAlign="Bottom" />
            </asp:DataList>
        </div>
        <div id="botoesCadastroFotos" class="ucBotoesFotos">
            <asp:LinkButton ID="lkVoltar" runat="server" OnClick="lkVoltar_Click">Voltar</asp:LinkButton>
        </div>
    </div>
</asp:Content>
